package job.work.domain.response;

import lombok.ToString;

/**
 * @author LXH
 * @Classname MerchantCode
 * @Date 2020/10/28 21:52
 * @Created by Administrator
 */

@ToString
public enum MerchantCode implements ResultCode {

    NOT_COMMONUSER(false, 5050, "普通用户没有权限"),
    NOT_MERCHANT_USER(false, 5110, "没有此商家"),
    NOT_MERCHANT(false, 10000, "操作错误"),
    SAME_NAME(false, 5000, "店铺名称已被使用"),
    NOT_AGENCY(false, 5030, "未曾有此代理"),
    UPGRADE_FAILED(false, 5040, "升级失败"),
    INSUFFICIENT_POINTS(false, 5041, "积分不足");;

    //操作是否成功
    boolean success;
    //操作代码
    int code;
    //提示信息
    String message;

    private MerchantCode(boolean success, int code, String message) {
        this.success = success;
        this.code = code;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }


}
